package iedcyt.acute.controller.listeners.errorLog;

import iedcyt.acute.model.ErrorLogModel;
import iedcyt.acute.view.ErrorLogView;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

public class PrevSelectionListener extends SelectionAdapter {

	private ErrorLogModel _model;
	private ErrorLogView _view;
	
	public PrevSelectionListener(ErrorLogView view, ErrorLogModel model) {
		this._model = model;
		this._view = view;
	}
	
	public void widgetSelected(SelectionEvent event) {
		_model.prevPage();
		
		_view.setErrors(_model.getErrors());

	}
}
